1. Field of the Invention
The present invention relates to recording and reproducing content stream data, and more particularly, to a recording medium with content stream data recorded thereon, wherein a recording apparatus and a reproducing apparatus is provided therefor.
2. Description of the Related Art
A single piece of various forms of content, such as, for example, a movie, a music track, etc., is referred to as a program in this specification.
FIG. 1 shows the data structure of a conventional program.
Generally, content stream data of a program is formed by one stream object (SOB). Referring now to FIG. 1, an SOB is formed of a chain in which one or more Stream Object Units (SOBUs) are linked. SOBUs are units in which data is recorded and edited. However, since the input and/or output speeds of data streams of a program may change in recording and/or reproducing, the corresponding SOBU lengths on a time axis may differ from one another. An SOBU includes a plurality of stream packs S_PCKs. SOBUs included in the same SOB include the same number of stream packs.
A stream pack S_PCK is formed by a pack header and a stream packet S_PKT. A stream packet S_PKT contains one or more application packets (AP_PKTs). An application packet AP_PKT is a piece of a bit stream input when a recording apparatus records data, or output when a reproducing apparatus reproduces data. Therefore, in front of the application packet AP_PKT, an Application Time Stamp (ATS) is located. An ATS is reproducing time information of the application packet AP_PKT following the ATS. The start and end of an application packet AP_PKT may not match the start and end of the stream pack S_PCK. That is, for example, an application packet AP_PKT may stretch over a boundary between two stream packs (i.e., two neighboring SOBUs).
To arbitrarily access a program recorded as shown in FIG. 1, search information is generally used. Search information may include information on a location of certain data in a program, program reproducing time information, and program recording time information. Search information may have various formats depending on applications. However, to reduce an amount of information and enable quick search, a hierarchical structure is frequently used to search for data in the program.
If search information of a program is formed of three layers, like for example, a cell layer, an SOB layer, and an SOBU layer, the search information includes information on which cell or cells correspond to a given program, information on which SOB or SOBs correspond to a given cell, and information on which SOBU or SOBUs correspond to a given SOB. Particularly, information on which SOBU or SOBUs correspond to a given SOB is referred to as a MAPping List (MAPL).
A mapping list contains an incremental application packet arrival time (IAPAT), which indicates a duration of a corresponding SOBU. The arrival time of an application packet AP_PKT contained in the corresponding SOBU is needed for obtaining the IAPAT. However, for determining the IAPAT of SOBUs, different methods are used depending on a location of the SOBU in an SOB. That is, methods may differ depending on whether or not the SOBU is a last SOBU in the SOB.
For example, when an SOB includes M SOBUs, a value obtained by accumulating IAPATs of the first SOBU through the i-th SOBU, excluding the last SOBU, should be less than a value obtained by adding 1 to the arrival time of the first application packet of SOBU (i+1). The IAPAT is assumed to be an integer expressed in units of 1.0, and the initial value of accumulation is 0. The above is expressed by the following relation:SOBU—S_APAT(i+1)≦SUM_IAPAT(i)≦SOBU—S_APAT(i+1)+1Here, SOBU_S_APAT(i+1) denotes an arrival time of a first application packet APPKT and SUM_IAPAT(i) denotes a value obtained by accumulating IAPAT values of all the preceding SOBUs and the current SOBU #i.
If an SOB includes M SOBUs, a value obtained by accumulating the first through the M-th IAPAT should be greater than the arrival time of the last application packet AP_PKT but greater by less than 1. All of the IAPATs are assumed to be integers expressed in units of 1.0, and the initial value of accumulation is 0.
Also, for SOBU #M, a value obtained by accumulating IAPATs of the first SOBU through SOBU #M should be greater than the arrival time of the last application packet AP_PKT included in SOBU #M, and should be less than or equal to a value obtained by adding 1 to the arrival time of the last application packet included in SOBU #M. This is expressed by the following equation:SOBU—E_APAT(M)≦SUM_IAPAT(M)≦SOBU—E_APAT(M)+1Here, SOBU_E_APAT(M) denotes the arrival time of the last application packet included in SOBU#M.A size of an application packet (AP_PKT_SZ) satisfies the following:AP_PKT_SZ≦2018×{SOBU_SZ}−2Here, SOBU_SZ denotes a size of an SOBU. The above expression is made considering that at least 30 bytes are needed for a pack header, and 2 bytes are needed for a header extension and a stuffing packet defined in a stream packet, assuming that one SOBU has a number of stream packs equal to a number of SOBU_SZs. Accordingly, this is due to the maximum area for application packets being the result of subtracting 30 bytes from 2048 bytes for one SOBU and then subtracting 2 bytes from the resulting 2018 bytes.
However, according to the above scope of the size of an application packet AP_PKT, a case occurs where no ATS exists in an SOBU.
FIG. 2 illustrates a case where there is no application time stamp (ATS) in a stream object unit (SOBU).
Referring now to FIG. 2, if the last stream pack contained in an SOB is located as shown a first byte forming an ATS is not included in SOBU #M−1. Since only a part of an application packet AP_PKT formed in the last stream pack is located in SOBU #M, there is no ATS included in SOBU #M and SOBU #M−1.
Thus, according to the size of the application packet, a case occurs where there is no corresponding ATS, such as in SOBU #M−1 and SOBU #M. Consequently, the IAPAT for an SOBU which has no corresponding ATS is not obtained, and therefore, a mapping list formed of the IAPATs as search information is not obtained. Accordingly, searching for a program is impossible.
Typically in a case where the last SOBU of an SOB does not have a corresponding ATS, the IAPAT is obtained using a copy of the ATS of the last application packet. However, according to a rule for obtaining IAPATs, the IAPAT(M−1) for SOBU #M−1, and IAPAT(M) for SOBU #M are both “0”, and therefore, a program search based on a mapping list formed of IAPAT is not carried out correctly.
IAPAT(i) should meet the following conditions:1≦=IAPAT(i)≦212, i=11≦=IAPAT(i)≦212−1, 1≦i≦M0≦=IAPAT(i)≦212−1, i=M
FIG. 3 illustrates a conventional method for obtaining an IAPAT in a case where there is no ATS included in the last SOBU.
Referring now to FIG. 3, IAPAT(M−1) is “0” and does not satisfy the above conditions.